package com.cdks.wuxiu.api.service;

import java.util.List;
import java.util.Set;

import com.cdks.wuxiu.api.model.dto.*;
import com.cdks.wuxiu.entity.mysql.UserAuthInfo;
import com.cdks.wuxiu.entity.mysql.UserBaseInfo;
import com.cdks.wuxiu.entity.mysql.UserExtendInfo;
import com.cdks.wuxiu.entity.mysql.UserFansInfo;
import com.cdks.wuxiu.entity.mysql.UserFriendInfo;
import com.cdks.wuxiu.entity.mysql.UserLoginInfo;


/**
 * 用户服务类
 */
public interface UserService {
    UserBaseInfo getUserById(long userId);
    UserBaseInfo getUserByPhone(String phone);
    UserBaseInfo getInviterInfo(long userId);
    UserExtendInfo getUserExtendInfo(long userId);
   
    UserInfoDTO getUserByIdWithFocus(long userId, long fansId);
    UserInfoDTO getUserByIdWithBalance(long userId, long expire);

    List<UserListDTO> getUserList(long self, int sex, int role, int userType, int type, int page);
    List<UserBaseInfo> getRandCallList(long userId, int sex);
    List<UserBaseInfo> getKefuList();
    List<UserInfoDTO> getInviteList(long userId, int page, int start, int stop);

    String getAuditNickname(long userId);
    String getAuditPortrait(long userId);

    int getAuthStatus(UserBaseInfo userInfo);
    int autoInviter(UserBaseInfo userInfo);
    int bindInviter(UserBaseInfo userInfo, long inviter);
    int updateInviter(UserBaseInfo userInfo, long inviter);
    int setInviteStatus(UserBaseInfo userInfo, int status);    
    int cancelFocus(long userId, long destId);
    int attachFocus(long userId, long destId);
    int cancelBlock(long userId, long destId);
    int attachBlock(long userId, long destId);    
    int saveAuditInfo(int auditType, long userId, String info, int status);
    int saveAuditInfo(int auditType, long userId, String info, int status, String remark);
    int saveUserBaseInfo(UserBaseInfo userInfo);
    int saveUserExtendInfo(UserExtendInfo userInfo);
    int realNameAuth(String name, String idCard, UserBaseInfo userInfo);
    int updatePushInfo(long userId, String token);
    int updatePushInfo(long userId, String pushToken, int pushStatus);
    int refuseHeadAudit(long userId);
    int setUserOnlineStatus(long userId, int status);
    int setUserOnlineStatus(long userId, int oldStatus, int newStatus);
    int setUserOnlineStatus(Set<String> ids, int oldStatus, int newStatus);

    Long getUserByIdcard(String idCard);
    InviteStatisDTO getInviteStatis(long userId);
    
    int setUserIdleTime(UserBaseInfo userInfo);
    int setUserIdleTime(long userId);

    UserLoginInfo getUserLoginInfo(long userId);
    boolean isBlocked(long senderId, long recverId);

    UserAuthInfo getAuthInfoByType(int type, long userId);
    List<UserAuthInfo> getAuthInfoByStatus(int status, long userId);
    int updateListenerInfo(UserBaseInfo userInfo);

    int cancelUserAuth(long userId);

    int setFriend(long userId, long friendId, int action);
    UserFriendInfo queryFriend(long userId, long friendId);
    List<UserFriendDTO> getFriendList(long userId, long startId);

    List<UserFocusDTO> getFocusList(Long userId, Long startId);
    int setFocus(Long userId, Long destId, Integer action);
    UserFansInfo queryFocusByUser(long userId, long destId);
}
